import Vue from 'vue'
import App from './App.vue'


//三级联动组件--全局注册
import TypeNav from '@/components/TypeNav'
//轮播图--全局注册
import Carousel from '@/components/Carousel'
//分页组件--全局注册
import Pagination from '@/components/Pagination'
//引入路由
import router from '@/router'
//引入仓库
import store from '@/store/index'

// import { Carousel,CarouselItem } from 'element-ui';

// Vue.component(Carousel.name, Carousel);
// Vue.component(CarouselItem.name, CarouselItem);

Vue.config.productionTip = false
//引用三级联动组件---全局组件
Vue.component(TypeNav.name,TypeNav)
Vue.component(Carousel.name,Carousel)
Vue.component(Pagination.name,Pagination)
//引入mockserve.js
import '@/mock/mockServe'
//引入swiper样式
import "swiper/css/swiper.css";


new Vue({
  render: h => h(App),
  //注册路由   KV一致省略V
  //完成这一步组件身上都有$router,$route属性
  router,
  //注册仓库，组件实例的身上多一个属性$store
  store,
  //安装全局事件总线
  beforeCreate() {
    Vue.prototype.$bus = this
  },
}).$mount('#app')
